<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html lang="en">
<head>
	<meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
	<title>obj</title>
	<script type="text/javascript">
	 //定义一个车类
	 name="tanglingbao";
	 function  car() {
	 	this.name="宝马";
	 	this.price="2012";
	 	this.type="x5";
	 	this.height="20";
	 	this.jayou=function(){
	 		alert('give me add oil');
	 	}
	 	this.run=function(){
	 		alert('i can run !');

	 	}
	
         this.getname=function(){
         	alert(name);

         }
	 	
	 }
	var obj=new car();
	for(var i in obj){
		document.write(obj[i]);
		document.write("<br>");
	}
	//obj.getname();
	</script>
</head>
<body>
	
</body>
</html>